home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12967 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.3 KB  |  54 lines

  1. Newsgroups: comp.lang.c
  2. Path: new-news.sprintlink.net!eskimo!scs
  3. From: scs@eskimo.com (Steve Summit)
  4. Subject: FAQ list overspecificity (was: Very Simple <maths.h> problem...)
  5. X-Nntp-Posting-Host: eskimo.com
  6. Message-ID: <DpAtJz.5z5@eskimo.com>
  7. Sender: news@eskimo.com (News User Id)
  8. Organization: schmorganization
  9. References: <4jf0c9$rs8@nic.umass.edu> <315B11FD.6460@oc.com>
  10. Date: Wed, 3 Apr 1996 18:19:10 GMT
  11.  
  12. In article <315B11FD.6460@oc.com>, Larry Weiss <lfw@oc.com> writes:
  13. > Eugene K Hall wrote:
  14. >> ld: Unresolved: exp
  15. > The answer can be found by extrapolating from this comp.lang.c FAQ entry:
  16. >    14.3:   I'm trying to do some simple trig, and I am #including <math.h>,
  17. >            but I keep getting "undefined: sin" compilation errors.
  18. >  
  19. >    A:      Make sure you're actually linking with the math library.  For
  20. >            instance, under Unix, you usually need to use the -lm option...
  21. >
  22. > Personally, I wish 14.3 were worded more inclusively (there's more than
  23. > just trig entry points affected).
  24.  
  25. Indeed.  The cited question is one of the ones (there are
  26. several) which is deficient because it tries to maintain a
  27. semblance of reality, that is, to be worded as real questions
  28. posted to the net are worded.  No one asks, "Why is the linker
  29. complaining that sqrt, or sin, or cos, or tan, or exp, or asin,
  30. or atan, or log, or pow is undefined?", so the FAQ list doesn't,
  31. either.  (Dave Barry has some advice for getting yourself out of
  32. tedious meetings: "...[H]ave an accomplice interrupt the meeting
  33. and announce that you have a phone call from somebody very
  34. important, such as the president of the company, or the Pope.
  35. It should be either one or the other.  It would sound fishy if
  36. the accomplice said, `You have a call from the president of the
  37. company.  Or the Pope.'")
  38.  
  39. The upside of the question as it's currently worded is that it
  40. appeals to the FAQ maintainer's sense of how the game ought to be
  41. played.  The downsides are that someone who knows he's not
  42. "trying to do some simple trig," or who is searching mechanically
  43. for the name of the one <math.h> routine he *is* having problems
  44. with, may overlook question 14.3.
  45.  
  46. I *do* assume, and hope, that someone reading 14.3 can
  47. extrapolate to other <math.h> functions.  Perhaps I doth assume
  48. too much.  Comments?
  49.  
  50.                     Steve Summit
  51.                     scs@eskimo.com
  52.